var LoadingComponent = React.createClass({
	componentDidMount: function() {

	},
	receiveMsg: function(data) {

	},
    getInitialState: function () {
        this.props.isHidden = true;
        return this.props ? this.props : {};
    },
    show: function() {
        this.setState({
            isHidden: false
        });
        return this;
    },
    hidden:function () {
        this.setState({
            isHidden: true
        });
        return this;
    },
    render:function() {
        return ~loading;
    }
});
LoadingComponent.init = function(config) {
    var divEle = $("<div id='loading'>");
    var loading = ReactDOM.render(<LoadingComponent/>, divEle[0]);
    $("body").append(divEle);
    return loading;
}
module.exports = LoadingComponent;